﻿@model IEnumerable<BatsMVCPortal.Models.Photo>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Topic
        </th>
        <th>
            PhotoName
        </th>
        <th>
            PhotoDescription
        </th>
        <th>
            UserId
        </th>
        <th>
            PhotoRating
        </th>
        <th>
            PhotoURL
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Topic.TopicType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PhotoName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PhotoDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PhotoRating)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PhotoURL)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.PhotoID }) |
            @Html.ActionLink("Details", "Details", new { id=item.PhotoID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.PhotoID })
        </td>
    </tr>
}

</table>
